widget-factory: Add a horizontal-buttons example
authorMatthias Clasen <mclasen@redhat.com>
Tue, 29 Apr 2014 10:21:11 +0000 (06:21 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 29 Apr 2014 10:22:28 +0000 (06:22 -0400)
Sadly, we don't have good icons for payment methods...

demos/widget-factory/widget-factory.c
demos/widget-factory/widget-factory.ui

index 7404e5967413912efda8e8bc1878c71e4c85395a..1e59b0d0acebf4c250dee08de6e504af8325b174 100644 (file)
@@ -287,11 +287,12 @@ main (int argc, char *argv[])
     { "about", activate_about, NULL, NULL, NULL },
     { "quit", activate_quit, NULL, NULL, NULL },
 
-    { "main", NULL, "s", "''", NULL },
+    { "main", NULL, "s", "'steak'", NULL },
     { "wine", NULL, NULL, "false", NULL },
     { "beer", NULL, NULL, "false", NULL },
-    { "water", NULL, NULL, "false", NULL },
-    { "dessert", NULL, "s", "''", NULL }
+    { "water", NULL, NULL, "true", NULL },
+    { "dessert", NULL, "s", "'bars'", NULL },
+    { "pay", NULL, "s", NULL, NULL }
 
   };
   gint status;
index cfe5905674fafdf29f3a1b994b529c03b06dacae..804556a47cdeef6eac7998dd0959e49cb936cacc 100644 (file)
           </item>
         </section>
       </submenu>
+      <section>
+        <attribute name="display-hint">horizontal-buttons</attribute>
+        <item>
+          <attribute name="label" translatable="yes">Cash</attribute>
+          <attribute name="action">app.pay</attribute>
+          <attribute name="target">cash</attribute>
+          <attribute name="verb-icon">document-save-symbolic</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Credit Card</attribute>
+          <attribute name="action">app.pay</attribute>
+          <attribute name="target">card</attribute>
+          <attribute name="verb-icon">document-send-symbolic</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Cheque</attribute>
+          <attribute name="action">app.pay</attribute>
+          <attribute name="target">cheque</attribute>
+          <attribute name="verb-icon">document-save-as-symbolic</attribute>
+        </item>
+      </section>
     </section>
   </menu>
   <object class="GtkAdjustment" id="adjustment1">